import { usePost } from '@/utils/request'

/**
 * 上传图片
 * @param file 图片文件
 * @returns 图片url
 */
export const uploadImage = (file: FormData) => {
  return usePost<string, FormData>('/file/upload', file, {
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
}
